package com.label.Model.Do;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;

/**
 * Role
 */
@TableName("role")
@Data
public class Role implements Serializable {

    @TableId(type = IdType.ASSIGN_ID,value = "id")
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long id;

    private String name;

    @TableField(value = "role_charge")
    private String charge;

    @TableField(exist = false)
    private List<Permission> permissions;
}
